package com.chushouya.manager.dto.admin.banner;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * Banner保存DTO
 * 用于新增Banner时的数据传输
 * 
 * @author chushouya
 */
@Data
@ApiModel("Banner保存")
public class BannerSaveDTO {

    @ApiModelProperty(value = "Banner名称", required = true)
    @NotBlank(message = "Banner名称不能为空")
    private String bannerName;

    @ApiModelProperty(value = "位置ID", required = true)
    @NotNull(message = "位置ID不能为空")
    private Long positionId;

    @ApiModelProperty("位置名称")
    private String positionName;

    @ApiModelProperty(value = "图片地址", required = true)
    @NotBlank(message = "图片地址不能为空")
    private String image;

    @ApiModelProperty("Banner图片颜色")
    private String color;

    @ApiModelProperty("跳转类型(0:无跳转,1:小程序跳转,2:网页跳转,3:商品详情,4:主题详情,5:第三方小程序,6:导购)")
    private Integer routeType;

    @ApiModelProperty("跳转地址")
    private String target;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("状态(0:禁用,1:启用)")
    private Integer status;

    @ApiModelProperty("开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @ApiModelProperty("结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    @ApiModelProperty("排序字段")
    private Integer sort;

    @ApiModelProperty("操作管理员")
    private String handleUser;

    @ApiModelProperty("appId")
    private String appId;

    @ApiModelProperty("app名称")
    private String appName;

    @ApiModelProperty("平台")
    private String platform;
}
